<template>
  <div class="detail-index">
    <h2 style="text-align: center">签约学生资料</h2>
    <van-cell-group
      :border="false"
      @click="$router.push('/user/detail/info')"
      center
      class="cell-group"
    >
      <van-cell center title="个人资料" is-link>
        <span class="red">待完善</span>
      </van-cell>
    </van-cell-group>
    <van-cell-group
      @click="$router.push('/user/detail/idCard')"
      :border="false"
      center
      class="cell-group"
    >
      <van-cell center title="身份证照片" is-link>
        <span class="red">待完善</span>
      </van-cell>
    </van-cell-group>
    <van-cell-group
      @click="$router.push('/user/detail/photo')"
      :border="false"
      center
      class="cell-group"
    >
      <van-cell center title="电子证件照片" is-link>
        <span class="red">待完善</span>
      </van-cell>
    </van-cell-group>
    <van-cell-group
      @click="$router.push('/user/detail/graduatePhoto')"
      :border="false"
      center
      class="cell-group"
    >
      <van-cell center title="毕业证书照片" is-link>
        <span class="red">待完善</span>
      </van-cell>
    </van-cell-group>
    <van-cell-group
      @click="$router.push('/user/detail/apply')"
      :border="false"
      center
      class="cell-group"
    >
      <van-cell center title="发票申请基本信息填写" is-link>
        <span class="red">待完善</span>
      </van-cell>
    </van-cell-group>
    <van-cell-group
      @click="show = true"
      :border="false"
      center
      class="cell-group"
    >
      <van-cell center title="生成合同" is-link> </van-cell>
    </van-cell-group>
    <van-image-preview v-model="show" :images="images" @change="onChange">
      <template v-slot:index>第{{ index + 1 }}张</template>
    </van-image-preview>
    <div class="nav" @click="$router.go(-1)">返回</div>
  </div>
</template>

<script>
import img1 from "@/static/1.jpg";
import img2 from "@/static/2.jpg";
import img3 from "@/static/3.jpg";
export default {
  data() {
    return {
      show: false,
      index: 0,
      images: [img1, img2, img3]
    };
  },
  methods: {
    onChange(index) {
      this.index = index;
    }
  }
};
</script>

<style scoped lang="less">
.detail-index {
  box-sizing: border-box;
  height: 100vh;
  overflow: hidden;
  // padding: .1rem 0;
  padding: 1px 0;
  background-color: #f1f1f1;
  font-size: 0.18rem;
  h2 {
    font-weight: normal;
    font-size: 0.35rem;
    margin: 0.3rem 0;
  }
  .cell-group {
    margin-top: 0.1rem;
    height: 0.85rem;
  }
  .cell-group:first-child {
    margin-top: 0;
  }
  .red {
    color: red;
  }
  .nav {
    position: fixed;
    bottom: 20%;
    right: 0;
    border-radius: 0.15rem 0 0 0.15rem;
    width: 1rem;
    height: 1rem;
    line-height: 1rem;
    text-align: center;
    background-color: #78a4ff;
    color: #fff;
    font-size: 0.26rem;
  }
}
</style>
